package com.byzx.wine.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.byzx.wine.dao.WineproductMapper;
import com.byzx.wine.jdbcdao.WineprductDao;
import com.byzx.wine.po.Wineproduct;
import com.byzx.wine.service.IWineprductService;
import com.byzx.wine.util.Page;
@Service
public class WineprductServiceimpl implements  IWineprductService{
@Autowired
WineproductMapper   winemapper;
@Autowired
WineprductDao      wineDao;
	@Override
	public Page<Map<String, Object>> findPage(Page<Map<String, Object>> page) {
		// TODO Auto-generated method stub
		return wineDao.findPage("com.byzx.wine.jdbcdao.WineproductDao.SelectAll", page);
	}

	@Override
	public int insert(Wineproduct wineprduct) {
		// TODO Auto-generated method stub
		return winemapper.insert(wineprduct);
	}



	@Override
	public int updateByPrimaryKeySelective(Wineproduct wineprduct) {
		// TODO Auto-generated method stub
		return winemapper.updateByPrimaryKeySelective(wineprduct);
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return winemapper.deleteByPrimaryKey(id);
		
	}

	@Override
	public Wineproduct selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return winemapper.selectByPrimaryKey(id);
	}

}
